import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpCourseColumn {
  id!: number;
  columnId?: number;
  courseId?: number;
  uniacid?: number;
  sort?: number;
  sort2: number = 0;
  courseType?: number;
}

export const ImsYzdKpCourseColumnSchema = new EntitySchema({
  class: ImsYzdKpCourseColumn,
  properties: {
    id: { primary: true, type: 'number' },
    columnId: { type: 'number', nullable: true, index: 'column_id' },
    courseId: { type: 'number', nullable: true, index: 'course_id' },
    uniacid: { type: 'number', nullable: true, index: 'uniacid' },
    sort: { type: 'number', nullable: true, index: 'sort' },
    sort2: { type: 'number', default: 0, index: 'sort2' },
    courseType: { type: 'number', nullable: true, index: 'course_type' },
  },
});
